Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 6 - Configuration Management / Configuration Management Reference
Functions / Getting Information About Ports


OTGetIndexedPort

Iterates through the ports available on your computer.

C INTERFACE
Boolean OTGetIndexedPort (OTPortRecord* record, 
                          size_t index);
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
record
A pointer to a port structure that contains information about a specific port on your computer.
index
An index number.
DESCRIPTION
The OTGetIndexedPort function returns information about the ports available on your local system. To iterate through all the ports on your computer, call the function repeatedly, incrementing the index parameter each time (starting with 0) until the function returns false. Each time the function returns true, it fills in the port structure that you provide with information about a specific port. You can use this information, for example, when specifying a provider configuration string for the OTCreateConfiguration function.

You must allocate the port structure; the function fills this structure with information about the port indicated by the index parameter. If the function returns false, the contents of the structure are not significant.

SEE ALSO
For information about finding ports, see the sections "About Port Information" (page 6-5) and "Obtaining Port Information" (page 6-11).

The port structure is described in "The Port Structure" (page 6-17).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996